#ifndef IRIDE_SDLENGINE_H_
#define IRIDE_SDLENGINE_H_

#include <SDL/SDL.h>

#include <iostream>

#include "IGraphics.h"
#include "IInput.h"
#include "IPixelDrawer.h"

namespace Iride
{
	class SdlEngine: public IGraphics, public IInput
	{
		private:
			const int mWidth;
			const int mHeight;

			SDL_Surface*    mpScreen;
			SDL_Surface*    mpVideoBuf;

			bool mInitialiased;
			bool mCleanedUp;

		public:
			SdlEngine(int width, int eight);

			bool Init();
			bool GetInput();
			void Update();
			void Render();
			void Cleanup();

			int GetWidth();
			int GetHeight();

			void DrawPixel(int x, int y, unsigned char r, unsigned char g, unsigned char b);

		private:
			bool HandleEvent(SDL_Event* Event);
	};
};

#endif
